﻿using System;
using System.Drawing;
using System.Windows.Forms;

namespace WindowsApplication2._18_设计模式.基础.继承._1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
        }

        protected override void OnPaint(PaintEventArgs e)
        {
            Graphics g = e.Graphics;
            rectangle r = new rectangle(10, 20, 70, 100);
            r.draw(g);

            base.OnPaint(e);

        }
    }
}